<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp" %>
<html>
<head>
<title>出版社管理</title>
<%@include file="/common/ec.jsp" %>
<%@include file="/common/extjs.jsp" %>
<%@include file="/common/meta.jsp" %>
<script type="text/javascript">
function removePress(pressId) {
    Ext.MessageBox.confirm('提示','确实要删除该出版社信息吗？删除后不能恢复！', function(btn){
        if (btn == 'yes') {
        	location.href="remove.do?model.id=" + pressId;
        }
    });
  }
</script>
</head>
<body>
<div><%@ include file="/common/messages.jsp"%></div>
<div class="x-panel">
  <div class="x-panel-header">出版社管理</div>
    <div class="x-toolbar">
      <table width="99%">
        <tr>
          <td> 
            <s:form action="index" theme="simple">
	        &nbsp;&nbsp;出版社名称：<s:textfield theme="simple" name="model.name" size="15"></s:textfield>
	                       出版社描述：<s:textfield theme="simple" name="model.descn" size="15"></s:textfield>
	        &nbsp;&nbsp;<s:submit value="查询" cssClass="button"></s:submit>
         </s:form>
         </td>
         <td align="right">
         <table> 
           <tr>
             <td><a href="${ctx}/press/editNew.do"><img src="${ctx}/images/icons/add.gif"/> 添加</a></td>
             <td><span class="ytb-sep"></span></td>
             <td><a href="${ctx}/press/index.do"><img src="${ctx}/images/icons/house.gif"/> 列表</a></td>
           </tr>
         </table>
         </td>
       </tr>
     </table>
   </div>   

   <div class="x-panel-body">
     <div style="margin-left:-3px;" align="center">
	<ec:table items="items" var="item" retrieveRowsCallback="limit" sortRowsCallback="limit" 
	action="index.do"
	useAjax="true" doPreload="false"
	maxRowsExported="1000" 
	pageSizeList="30,50,100,200" 
	editable="false" 
	sortable="false"	
	rowsDisplayed="30"	
	generateScript="true"	
	resizeColWidth="true"	
	classic="false"	
	width="100%" 	
	height="460px"	
	minHeight="460" 
	toolbarContent="navigation|pagejump|pagesize|refresh|extend|status"  
	>
	<ec:row>
		<ec:column width="40" property="_no" title="序号" value="${GLOBALROWCOUNT}" style="text-align:center" sortable="false"/>
		<ec:column width="200" property="name" title="出版社名称" />
		<ec:column width="300" property="descn" title="出版社描述" />
		<ec:column width="100" property="_0" title="操作" style="text-align:center" viewsAllowed="html" sortable="false">
			<a href="edit.do?model.id=${item.id}">编辑</a> |
			<a href="#" onClick="removePress(${item.id})">删除</a>
		</ec:column>
	</ec:row>
	</ec:table>
  </div>
  </div>
  </div>
</body>
</html>